package com.lingxu.module.modelScore.controller;

import com.lingxu.base.common.api.vo.Result;
import com.lingxu.module.modelScore.entity.ModelScoreBase;
import com.lingxu.module.modelScore.service.ModelScoreBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Title: ModelScore
 * @Package: com.ptmh.module.modelSorce.controller
 * @Author: ysj闫世杰
 * @Email: 1105324813@qq.com
 * @Date: Created in 2023/11/29 16:09
 * @Description:  模型评分
 * @Version: 1.0.0
 */
@RestController
@RequestMapping(value = "/model/score")
public class ModelScoreBaseController {

    @Autowired
    private ModelScoreBaseService modelScoreBaseService;

    /**
     * @Author ysj闫世杰
     * @Description 新增评分标准
     * @Date 2023/11/29 16:30
     * @Param: scoreBase
     * @return com.ptmh.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/addModelScoreBase")
    public Result addModelScoreBase(@RequestBody ModelScoreBase scoreBase){
        return modelScoreBaseService.addModelScoreBase(scoreBase);
    }

    /**
     * @Author ysj闫世杰
     * @Description 修改评分标准
     * @Date 2023/11/29 17:01
     * @Param: scoreBase
     * @return com.ptmh.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/updateModelScoreBase")
    public Result updateModelScoreBase(@RequestBody List<ModelScoreBase> scoreBase){
        return modelScoreBaseService.updateModelScoreBase(scoreBase);
    }

    /**
     * @Author ysj闫世杰
     * @Description 查询评分标准
     * @Date 2023/11/29 17:12
     * @Param:
     * @return com.ptmh.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/findModelScoreBase")
    public Result findModelScoreBase(){
        return modelScoreBaseService.findModelScoreBase();
    }


    /**
     * @Author ysj闫世杰
     * @Description 处理计算模型
     * @Date 2023/12/8 9:07 
     * @Param: 
     * @return com.lingxu.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/startModelScoreHandler")
    public Result startModelScoreHandler(String id){
        return modelScoreBaseService.startModelScoreHandler(id);
    }
}
